package com.briup.cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.briup.cms.bean.Category;
import com.briup.cms.bean.extend.CategoryExtend;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author briup
 * @since 2025-03-19
 */
@Service
public interface ICategoryService {

    void insert(Category category);
    Category getCategoryById(Integer id);
    //更新栏目
    void update(Category category);
    //根据栏目id删除
    void deleteById(Integer id);

    void deleteInBatch(List<Integer> ids);

    //分页+条件查询(根据parent_id)
    IPage<Category> query(Integer pageNum, Integer pageSize,
                          Integer parentId);

    List<CategoryExtend> queryAllParent();

    List<Category> queryAllOneLevel();

    List<Category> queryAll();

    void insertInBatch(List<Category> list);
}
